<?php get_instance()->view('common/header');?>
<div class="page-container home">
  <?php get_instance()->view('common/sidebar');?>
  <div class="page-content-wrapper">
	  <div class="page-content">
	    <div class="row">
	      <div class="col-md-12">
	        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
	        <h3 class="page-title"> 角色管理 </h3>
	        <ul class="page-breadcrumb breadcrumb">
	          <li><i class="fa fa-home"></i><a href="javascript:void(0);">角色管理 </a></li>
	        </ul>
	        <!-- END PAGE TITLE & BREADCRUMB-->
	      </div>
	    </div>
	    <div class="row">
	      <div class="col-md-12">
	      		<div class="portlet">
	            <div class="portlet-body">
	              <div class="table-container">
	                <div class="table-actions-wrapper"><span></span>
                        <?php if (adminAuthority('role-add', 'setting')):?>
	                        <a class="btn btn-sm blue add-dept-btn" href="<?php echo getUrl('setting/role/add');?>"><i class="fa fa-plus"></i> 新增</a>
                        <?php endif;?>
	                </div>
	                <table class="table table-bordered table-hover" id="datatable">
	                  <thead>
	                    <tr role="row" class="heading">
	                      <th>名称</th>
	                      <th width="100px">状态</th>
	                      <th width="120px">操作</th>
	                    </tr>
	                     <tr class="filter" role="row">
	                      <th><input class="form-control form-filter" name="name" type="text"></th>
	                      <th>
	                      	<select class="form-control form-filter select2" name="status">
	                      		<option value="">所有</option>
	                      		<?php foreach ($status as $k => $v):?>
	                      		<option value="<?php echo $k;?>"><?php echo $v;?></option>|
	                      		<?php endforeach;?>
	                      	</select>
	                      </th>
	                      <th>
	                      		<div class="btn-group">
                                    <a class="btn btn-xs filter-submit btn-default"><i class="fa fa-search"></i> 搜索</a>
                                    <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
                                    <ul role="menu" class="dropdown-menu pull-right">
                                        <li><a href="javascript:void(0);" class="filter-cancel">重置</a></li>
                                    </ul>
                                </div>
                           </th>
	                    </tr>
	                  </thead>
	                  <tbody></tbody>
	                </table>
	              </div>
	            </div>
	          </div>
	      </div>
	    </div>			  
	  </div>
  </div>
</div>
<script type="text/javascript">
	$(function(){
		datatable_init({
			src: $("#datatable"),
			sAjaxSource: "<?php echo getUrl('setting/role/getList');?>",
			bSort:false,
		});
	});
</script>
</body>
</html>